package C013;

import java.util.Stack;

/**
 * ClassName: Stack01
 * Package: C013
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/12/2 14:43
 * @Version 1.0
 * @Since 1.0
 */
public class Stack01 {

    public static void main(String[] args) {
        JDKStack<Integer> stack = new JDKStack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        System.out.println(stack.peek());
        System.out.println(stack.pop());
        System.out.println(stack.peek());
    }

    static class JDKStack<T>{
        Stack<T> stack = new Stack<>();

        public T push(T t){
            return stack.push(t);
        }

        public T pop(){
            return stack.pop();
        }

        public T peek(){
            return stack.peek();
        }
        public boolean isEmpty(){
            return stack.empty();
        }
    }
}
